﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="website_admin_product_brandeditor" Codefile="brandeditor.aspx.cs" %>
 
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<%@ Register Src="../../admin/_root/_controls/ctlNavBar.ascx" TagName="ctlNavBar"
    TagPrefix="uc1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>

    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="../../admin/_static/_jQuery/jquery_validator.js"></script>

    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>

    <script language="javascript" src="../_static/_jQuery/jquery-fileupload.js" type="text/javascript"></script>

    <script language="javascript" src="../_static/_jQuery/interface.js" type="text/javascript"></script>

    <link href="../_common/styles/frame_global.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
    $(document).ready(setup);
    function setup()
    {
        validator.setup("#crmForm");
        uploadcreate($("#divUploadControlArea_BrandImage"), "BrandImage");
    }
    function Cancel()
    {
        var groupid=getUrlParam("groupid");
        window.location.href="brandmaglist.aspx?groupid="+groupid;
    }
    //删除方法    
    var uploadinit = function(obj){
        if(confirm("您确定要执行删除操作?"))
        {
           currentItemID ++;
           $.ajax({
                async: false,
                type: "POST",
                url: "brandeditor.aspx",
                data: {
                    otype : "removefile", 
                    filename: obj.attr("filedata").split("*")[1], 
                    itemid: obj.attr("itemid"), 
                    extname: obj.attr("filedata").split("*")[2]
                },
                success: function(data, textStatus) {
                    obj.parent().remove(); 
                    $("#txtUploadControl_"+obj.attr("itemid")).removefile(obj.attr("filedata"));
                }
            });
        }
    };
    </script>

</head>
<body>

    <script type="text/javascript">
    <!--
        function ___doPostBack(eventTarget) { 
            var theForm = document.forms["crmForm"];
            if (!theForm) {
                theForm = document.crmForm;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) { 
                theForm.___EVENTTARGET.value = eventTarget;
                theForm.submit();
            }
        }
    // -->
    </script>

    <div id="success" style="position: absolute; z-index: 300; height: 130px; width: 284px;
        left: 50%; top: 50%; margin-left: -150px; margin-top: -80px;">
        <div style="position: absolute; z-index: 300; width: 270px; height: 90px; background-color: #FFFFFF;
            border: solid #6699CC 1px; font-size: 14px;">
            <div style="height: 64px; line-height: 150%; padding: 0px 3px 0px 3px;" align="center">
                <br />
                <table>
                    <tr>
                        <td valign="top">
                            <img border="0" src="../_imgs/admin/progress.gif" />
                        </td>
                        <td valign="middle" style="font-size: 14px; width: 150px;">
                            操作执行中 ...<br />
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </div>
        <div style="position: absolute; width: 270px; height: 108px; z-index: 299; left: 4px;
            top: 5px; background-color: #E8E8E8; border: #E8E8E8 1px solid; display: none;">
        </div>
    </div>

    <script type="text/javascript">
        document.getElementById("success").style.display = "none"; 
    </script>

    <script src="../../admin/_static/_common/scripts/divcover.js" type="text/javascript"></script>

    <form id="crmForm" runat="server">
    <input type="hidden" name="___EVENTTARGET" id="___EVENTTARGET" value="" />
    <div class="divAreas">
        <div class="boxTopBar">
            <div class="boxTopBarLeft">
                <div class="navBar">
                    <uc1:ctlNavBar ID="ctlNavBar1" runat="server" />
                </div>
            </div>
            <div class="boxTopBarRight">
            </div>
        </div>
        <div class="boxMain">
            <div class="boxMainBody">
                <table cellpadding="0" cellspacing="0" class="stdTable" style="width: 98%;">
                    <tbody>
                        <tr style="height: 32px; background: #F0F0F0; padding-left: 10px; font-weight: bold;
                            text-align: left;">
                            <td>
                                编辑品牌信息
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" style="padding: 5px 5px 5px;">
                                <div style="overflow-y: scroll; overflow-x: hidden; height: 300px; margin-left: auto;
                                    margin-right: auto; padding: 10px 20px 10px 20px; width: auto;">
                                    <table class="tbsToolsBar" cellpadding="0" cellspacing="0" align="center" style="width: auto;
                                        vertical-align: top;">
                                        <colgroup>
                                            <col style="width: 75px;" />
                                            <col />
                                            <col style="width: 85px; text-align: right;" />
                                            <col />
                                        </colgroup>
                                        <tbody>
                                            <tr>
                                                <td>
                                                    名称：
                                                </td>
                                                <td colspan="3">
                                                    <input type="text" class="tbxReadOnly" id="txtBrandName" name="txtBrandName"
                                                        runat="server" required="required" controlname="名称" isvalidator />
                                                </td>
                                            </tr>    
                                            <tr>
                                                <td>
                                                    序号：
                                                </td>
                                                <td>
                                                    <input type="text" class="tbxReadOnly" id="txtLineNum" name="txtLineNum"
                                                        value="0" style="width: 80px;" runat="server" required="required" controlname="序号"
                                                        isvalidator />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    标题图片：
                                                </td>
                                                <td>
                                                    <input id="txtUploadControl_BrandImage" runat="server" type="hidden" />
                                                    <div id="divUploadControlArea_BrandImage" runat="server">
                                                    </div>
                                                    <div id="divProductImagesList_BrandImage" runat="server">
                                                    </div>
                                                </td> 
                                            </tr> 
                                            <tr>
                                                <td>
                                                    详细介绍：
                                                </td>
                                                <td colspan="3">
                                                    <CE:Editor ID="txtComment" runat="server" AutoConfigure="Simple" Width="100%">
                                                    </CE:Editor>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr style="height: 35px;">
                            <td class="WIN-Form-Bottom">
                                <input type="button" value="保存信息" id="btnSave" class="btn_s" onclick="if(validator.validatorAll()){this.disabled=true;success.style.display='block';HideOverSels('success');___doPostBack('save');}"
                                    style="width: 120px; height: 25px; margin: 0px 5px;" />
                                <input type="button" value="返回列表" id="btnCancel" class="btn_s" onclick="Cancel();"
                                    style="height: 25px; width: 120px; margin: 0px 5px;" />
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="boxBottomBar">
            <div class="boxBottomBarLeft">
                &nbsp;
            </div>
            <div class="boxBottomBarRight">
                &nbsp;
            </div>
        </div>
    </div>
    </form>
</body>
</html>
